<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="./template.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .ui-treetable table {
                table-layout: fixed
            }
        </style>
    </ui:define>
    
    <ui:define name="title">
        TreeTable - <span class="subitem">Sort</span>
    </ui:define>

    <ui:define name="description">
        Sibling nodes can be sorted within a parent.
    </ui:define>

    <ui:param name="documentationLink" value="/components/treetable" />

    <ui:define name="implementation">
        
        <h:form>
            <p:treeTable value="#{ttBasicView.root}" var="document">
                <f:facet name="header">
                    Document Viewer
                </f:facet>
                <p:column headerText="Name" sortBy="#{document.name}">
                    <h:outputText value="#{document.name}" />
                </p:column>
                <p:column headerText="Size" sortBy="#{document.size}">
                    <h:outputText value="#{document.size}" />
                </p:column>
                <p:column headerText="Type"  sortBy="#{document.type}">
                    <h:outputText value="#{document.type}" />
                </p:column>
            </p:treeTable>
        </h:form>
        
    </ui:define>

</ui:composition>